using System.Collections.Generic;

namespace BCW.Friends
{
	public class Conversation
	{
		public bool historyLoaded;

		public bool sorted = true;

		public uint unreadMessages;

		public List<Message> messages = new List<Message>();

		public void Sort()
		{
			messages.Sort((Message x, Message y) => x.timeStamp.CompareTo(y.timeStamp));
			if (messages.Count > 50)
			{
				messages.RemoveRange(0, messages.Count - 50);
			}
			sorted = true;
		}
	}
}
